<?php

// src/INT/AdminBundle/Entity/Seance.php

namespace INT\AdminBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Seance
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="INT\AdminBundle\Entity\SeanceRepository")
 */
class Seance {

    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;
    public function __toString() {
        return (String) $this->getNumero();
    }
    
  /**
   * @ORM\ManyToOne(targetEntity="INT\AdminBundle\Entity\Filiere", inversedBy="seances")
   */
  private $filiere;

    /**
     * @ORM\ManyToMany(targetEntity="INT\AdminBundle\Entity\Groupe" ,inversedBy="seances")
     */
    private $groupes;

    /**
     * @ORM\ManyToOne(targetEntity="INT\UserBundle\Entity\User", inversedBy="seances")
     */
    private $enseignant;

    /**
     * @ORM\ManyToOne(targetEntity="Matiere", inversedBy="seances")
     */
    private $matiere;
    
   // a voir 
   /**
   * @ORM\OneToMany(targetEntity="INT\AdminBundle\Entity\EtudiantPresence", mappedBy="seances")
   */
  private $etudiantpresence;
  
  /**
   * @ORM\ManyToOne(targetEntity="INT\AdminBundle\Entity\Salle", inversedBy="seances")
   */
  private $salle;
  
  //fin

    /**
     * @var string
     *
     * @ORM\Column(name="type", type="string", length=255)
     */
    private $type;
/**
     * @var string
     *
     * @ORM\Column(name="jour", type="string", length=255)
     */
    private $jour;
    /**
     * @var integer
     *
     * @ORM\Column(name="numero", type="integer", length=255)
     */
    private $numero;

    /**
     * @var \String
     *
     * @ORM\Column(name="heure_debut",type="string", length=255)
     */
    private $heure_debut;

    /**
     * @var \String
     *
     * @ORM\Column(name="heure_fin",type="string", length=255)
     */
    private $heure_fin;

    /**
     * Constructor
     */
    public function __construct()
    {
        $this->groupes = new \Doctrine\Common\Collections\ArrayCollection();
        $this->etudiantpresence = new \Doctrine\Common\Collections\ArrayCollection();
    }
    
    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set type
     *
     * @param string $type
     * @return Seance
     */
    public function setType($type)
    {
        $this->type = $type;
    
        return $this;
    }

    /**
     * Get type
     *
     * @return string 
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Set numero
     *
     * @param integer $numero
     * @return Seance
     */
    public function setNumero($numero)
    {
        $this->numero = $numero;
    
        return $this;
    }

    /**
     * Get numero
     *
     * @return integer 
     */
    public function getNumero()
    {
        return $this->numero;
    }

    /**
     * Set heure_debut
     *
     * @param \DateTime $heureDebut
     * @return Seance
     */
    public function setHeureDebut($heureDebut)
    {
        $this->heure_debut = $heureDebut;
    
        return $this;
    }

    /**
     * Get heure_debut
     *
     * @return \DateTime 
     */
    public function getHeureDebut()
    {
        return $this->heure_debut;
    }

    /**
     * Set heure_fin
     *
     * @param \DateTime $heureFin
     * @return Seance
     */
    public function setHeureFin($heureFin)
    {
        $this->heure_fin = $heureFin;
    
        return $this;
    }

    /**
     * Get heure_fin
     *
     * @return \DateTime 
     */
    public function getHeureFin()
    {
        return $this->heure_fin;
    }

    /**
     * Add groupes
     *
     * @param \INT\AdminBundle\Entity\Groupe $groupes
     * @return Seance
     */
    public function addGroupe(\INT\AdminBundle\Entity\Groupe $groupes)
    {
        $this->groupes[] = $groupes;
    
        return $this;
    }

    /**
     * Remove groupes
     *
     * @param \INT\AdminBundle\Entity\Groupe $groupes
     */
    public function removeGroupe(\INT\AdminBundle\Entity\Groupe $groupes)
    {
        $this->groupes->removeElement($groupes);
    }

    /**
     * Get groupes
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getGroupes()
    {
        return $this->groupes;
    }

    /**
     * Set enseignant
     *
     * @param \INT\UserBundle\Entity\User $enseignant
     * @return Seance
     */
    public function setEnseignant(\INT\UserBundle\Entity\User $enseignant = null)
    {
        $this->enseignant = $enseignant;
    
        return $this;
    }

    /**
     * Get enseignant
     *
     * @return \INT\UserBundle\Entity\User 
     */
    public function getEnseignant()
    {
        return $this->enseignant;
    }

    /**
     * Set matiere
     *
     * @param \INT\AdminBundle\Entity\Matiere $matiere
     * @return Seance
     */
    public function setMatiere(\INT\AdminBundle\Entity\Matiere $matiere = null)
    {
        $this->matiere = $matiere;
    
        return $this;
    }

    /**
     * Get matiere
     *
     * @return \INT\AdminBundle\Entity\Matiere 
     */
    public function getMatiere()
    {
        return $this->matiere;
    }

    /**
     * Add etudiantpresence
     *
     * @param \INT\AdminBundle\Entity\EtudiantPresence $etudiantpresence
     * @return Seance
     */
    public function addEtudiantpresence(\INT\AdminBundle\Entity\EtudiantPresence $etudiantpresence)
    {
        $this->etudiantpresence[] = $etudiantpresence;
    
        return $this;
    }

    /**
     * Remove etudiantpresence
     *
     * @param \INT\AdminBundle\Entity\EtudiantPresence $etudiantpresence
     */
    public function removeEtudiantpresence(\INT\AdminBundle\Entity\EtudiantPresence $etudiantpresence)
    {
        $this->etudiantpresence->removeElement($etudiantpresence);
    }

    /**
     * Get etudiantpresence
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getEtudiantpresence()
    {
        return $this->etudiantpresence;
    }

    /**
     * Set salle
     *
     * @param \INT\AdminBundle\Entity\Salle $salle
     * @return Seance
     */
    public function setSalle(\INT\AdminBundle\Entity\Salle $salle = null)
    {
        $this->salle = $salle;
    
        return $this;
    }

    /**
     * Get salle
     *
     * @return \INT\AdminBundle\Entity\Salle 
     */
    public function getSalle()
    {
        return $this->salle;
    }


    /**
     * Set filiere
     *
     * @param \INT\AdminBundle\Entity\Filiere $filiere
     * @return Seance
     */
    public function setFiliere(\INT\AdminBundle\Entity\Filiere $filiere = null)
    {
        $this->filiere = $filiere;
    $filiere->addSeance($this);
        return $this;
    }

    /**
     * Get filiere
     *
     * @return \INT\AdminBundle\Entity\Filiere 
     */
    public function getFiliere()
    {
        return $this->filiere;
    }
    

    /**
     * Set jour
     *
     * @param string $jour
     * @return Seance
     */
    public function setJour($jour)
    {
        $this->jour = $jour;
    
        return $this;
    }

    /**
     * Get jour
     *
     * @return string 
     */
    public function getJour()
    {
        return $this->jour;
    }
}